package com.pn.mapper;

import com.github.pagehelper.Page;
import com.pn.entity.Client;
import com.pn.entity.Store;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ClientMapper {

    Page<Client> clientPageList(Client client);

    //修改客户
    int clientUpdate(Client client);

    //添加客户
    @Insert("insert into client values (null,#{clientName},#{clientAddress},#{connectionPerson},#{phone}," +
            "#{isDelete},#{createBy},#{createTime},null,null)")
    int clientInsert(Client client);

    //删除客户
    @Update("update client set is_delete = 1,update_by =#{updateBy},update_time = #{updateTime} where client_id = #{clientId}")
    int clientDelete(Client client);

    //显示客户表
    @Select("select * from client where is_delete = 0")
    List<Client> clientList();
}
